import { createRouter, createWebHashHistory } from 'vue-router';
import Layout from '@/layout/index.vue';
import Login from '@/views/login/index.vue';
//公共路由
const publicRoutes = [
  {
    path: '/',
    component: Layout,
    meta: {
      title: '首页'
    },
    redirect: '/table',
    children: [
      {
        path: '/table',
        meta: {
          title: '表格示例'
        },
        component: () => import('@/views/table')
      },
      {
        path: '/card',
        meta: {
          title: 'card页面'
        },
        component: () => import('@/views/card')
      }
    ]
  },
  { path: '/login', component: Login }
];
//私有路由
// const privateRoutes = [

// ];

const routes = [...publicRoutes];
export default createRouter({
  history: createWebHashHistory(),
  routes
});
